import QtQuick 2.14
import QtQuick.Window 2.14
import QtQuick.Controls 2.5
import QtGraphicalEffects 1.0
import QtQuick.Dialogs 1.3

import "./Src/leftPage"
import "./Src/rightPage"
import "./Src/playMusic"
import "./Src/commonUI"
import "./Src/basic"
import "./Src/mainPopups"

JtomWindow {
    id: window
    width: 1317
    height: 933

    Connections {
        target: BasicConfig
        function onOpenLoginPopup() {
            loginPopup.open()
        }
        function onOpenColorSelectPopup() {
            rectPop.open()
        }
    }

    LeftPage {
        id: leftRect
        width: 255
        anchors.left: parent.left
        anchors.top: parent.top
        anchors.bottom: bottomRect.top
        color: "#1a1a21"
    }

    RightPage {
        id: rightRect
        anchors.top: parent.top
        anchors.bottom: bottomRect.top
        anchors.left: leftRect.right
        anchors.right: parent.right
        color: "#13131a"
    }

    PlayMusic {
        id: bottomRect
        height: 100
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        color: "#2d2d37"
    }

    LoginPopup {
        id: loginPopup
        anchors.centerIn: parent
        width: 466
        height: 638
        clip: true // 阻止内容超出控件
        closePolicy: Popup.NoAutoClose  // Popup不自动关闭
    }

    LoginByOtherMeansPopup {
        id: loginByOtherMeansPopup
    }

    CustomColorAjustWindow {
        id: rectPop
        width: 600
        height: 400
        modal: true
        x: (parent.width - width) / 2
        y: (parent.height - height) / 2
        closePolicy: Popup.NoAutoClose
    }
}
